﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TimKenSite.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="TimKen.Web.User.Register" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    
  .divfont_family {font-family: 微软雅黑, Arial, Helvetica, sans-serif;font-size:12px; font-weight:lighter; }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server"> 
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server"> 
<form runat="server">
<script src="../Common/Script/jquery-1.7.2/jquery-1.7.2.js" type="text/javascript"></script>  
<script src="../Common/Script/formValidatorRegex.js" type="text/javascript"></script>
<script src="../Common/Script/formValidator_min.js" type="text/javascript"></script>
<link href="../Common/Style/validator.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">

        $(document).ready(function () {
            $.formValidator.initConfig({ formid: "aspnetForm", onerror: function (msg) { alert(msg) } });

            $("#<%=txtUserName.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_UserNameNotAllowBlank")%>' + '(5-20)', onfocus: '<%=GetLangString("x_UserNameNotAllowBlank")%>' + '(5-20)', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 5, max: 50, onerror: '<%=GetLangString("InputInvalid")%>' + '(5-20)' }).regexValidator({ regexp: "^[a-zA-Z][a-zA-Z0-9\_]{5,20}$", onerror: '<%=GetLangString("x_UserNameNotValided")%>' });



            $("#<%=txtPassword.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_PasswordNotAllowBlank")%>' + '(1-25)', onfocus: '<%=GetLangString("x_PasswordNotAllowBlank")%>' + '(1-25)', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, max: 25, empty: { leftempty: false, rightempty: false, emptyerror: '<%=GetLangString("InputInvalid")%>' }, onerror: '<%=GetLangString("x_PasswordNotAllowBlank")%>' + '(1-25)' });
            $("#<%=txtConfirmPassword.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_PasswordNotAllowBlank")%>', onfocus: '<%=GetLangString("x_PasswordNotAllowBlank")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, empty: { leftempty: false, rightempty: false, emptyerror: '<%=GetLangString("InputInvalid")%>' }, onerror: '<%=GetLangString("x_PasswordNotAllowBlank")%>' }).compareValidator({ desid: "<%=txtPassword.ClientID%>", operateor: "=", onerror: '<%=GetLangString("x_ErrorConfirmPassword")%>' });


            $("#<%=txtEmail.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_EmailNotAllowBlank")%>' + '(6-100)', onfocus: '<%=GetLangString("InputCorrectLinkInfo")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 6, max: 100, onerror: '<%=GetLangString("x_EmailNotValided")%>' + '(6-100)' }).regexValidator({ regexp: "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", onerror: '<%=GetLangString("x_EmailNotValided")%>' });


            $("#<%=txtRealName.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_RealNameNotAllowBlank")%>' + '(1-10)', onfocus: '<%=GetLangString("InputCorrectLinkInfo")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, max: 10, onerror: '<%=GetLangString("InputInvalid")%>' + '(1-10)' });

            $("#<%=txtCompany.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_CompanyNotAllowBlank")%>' + '(1-100)', onfocus: '<%=GetLangString("InputCorrectLinkInfo")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, max: 100, onerror: '<%=GetLangString("InputInvalid")%>' + '(1-100)' });

            $("#<%=txtPhone.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_PhoneNotAllowBlank")%>' + '(1-15)', onfocus: '<%=GetLangString("InputCorrectLinkInfo")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, max: 15, onerror: '<%=GetLangString("InputInvalid")%>' + '(1-15)' });

            $("#<%=this.btnRegister.ClientID%>").click(function () {
                if (jQuery.formValidator.pageIsValid())
                    return true;
                return false;

            });
        });
    </script>

    <div class="rtitle">
         <%=GetLangString("UserRegister") %>
    </div>
    <br />
    <b>&nbsp; <%=GetLangString("InputRegisterInfo") %></b>
    <br />
    <div class="register divfont_family">
        <ul class="divfont_family">
            <li>
                <div class="regright"> 
                    <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox><br />
                    <div id="<%=txtUserName.ClientID%>Tip"><%--用户名--%>
                </div>
                </div>
                <div class="regtitle" >
                    <%=GetLangString("UserName")%>： </div>
            </li>
            <li>
                <div class="regright"> 
                     <asp:TextBox ID="txtRealName" runat="server"></asp:TextBox><br />
                    <div id="<%=txtRealName.ClientID%>Tip" ></div>
                </div>
                <div class="regtitle">
                    <%=GetLangString("RealName")%>：<%--真实姓名--%>
                    </div>
            </li>
            <li>
                <div class="regright"> 
                    <asp:TextBox ID="txtCompany" runat="server"></asp:TextBox><br />
                    <div id="<%=txtCompany.ClientID%>Tip" ></div>
                </div>
                <div class="regtitle">
                    <%=GetLangString("Company")%>：<%--公司--%>
                    </div>
            </li>
            <li>
                <div class="regright"> 
                     <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox><br />
                    <div id="<%=txtPhone.ClientID%>Tip" ></div>
                </div>
                <div class="regtitle">
                    <%=GetLangString("Telephone")%>：<%--电话--%>
                    </div>
            </li>
            <li>
                <div class="regright">
                    <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox><br />
                    <div id="<%=txtEmail.ClientID%>Tip" ></div>
                </div> 
                <div class="regtitle">
                    <%=GetLangString("Email")%>：<%--邮箱--%>
                    </div>
            </li>
            <li>
                <div class="regright"> 
                   <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"  Width="150"></asp:TextBox><br />
                    <div id="<%=txtPassword.ClientID%>Tip" ></div>
                </div>
                <div class="regtitle">
                    <%=GetLangString("Password")%>：<%--密码--%>
                    </div>
            </li>
            <li>
                <div class="regright">
                    <asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password" Width="150"></asp:TextBox><br />
                    <div id="<%=txtConfirmPassword.ClientID%>Tip"  ></div>
                </div> 
                <div class="regtitle">
                    <%=GetLangString("ConfirmPassword")%>：<%--确认密码--%>
                    </div>
            </li>
            <li>
                <div class="regright"> 
                   <asp:TextBox ID="txtCheckCode" runat="server" Width="150"></asp:TextBox><br />
                    <asp:Label ID="Msg" runat="server" ForeColor="Red">
                    <img src="../ashx/ValidateCode.ashx" id="code" alt="CAPTCHA" border="1" onclick="this.src='../ashx/ValidateCode.ashx?stamp='+Math.random()"
                    style="cursor: pointer; display: block" title='<%=GetLangString("ChangeValidator") %>' />
                    </asp:Label>
                </div>
                <div class="regtitle">
                    <%=GetLangString("Validator")%>：
                    </div>
            </li>
            <li>
             <div class="regright"><% if (LanguageID == 1){%>
            <asp:ImageButton ID="btnRegister" runat="server" OnClick="btnRegister_Click"   ImageUrl="~/Common/Image/iconbtnbg/zhucebtn.gif"></asp:ImageButton>
             <%}
             else { 
              %>
            <asp:ImageButton ID="ImageButton1" runat="server" OnClick="btnRegister_Click"   ImageUrl="/images/enBtn/Register.jpg"></asp:ImageButton>
            <%} %></div>
            </li>
        </ul>
    </div>
    </form>
</asp:Content>
